<html>
<head>
    <title>index</title>
    <script type="text/javascript" src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script type="text/javascript" src="./js/jquery.base64.js"></script>

    <script type="text/javascript">
        $(function () {
            $("#encodeBase64").on("click", function () {
                var val = $("#inputText").val();
                var val2 = $.base64.encode(val);
                console.log(val, val2);
                $("#outputText").html(val2);
            });
            $("#decodeBase64").on("click", function () {
                var val = $("#inputText").val();
                var val2 = $.base64.decode(val);
                console.log(val, val2);
                $("#outputText").html(val2);
            });

            $("#sendParamenter").on("click", function () {
                var val = $("#getParameter").val();
                console.log(val.length);
                var url = "./config/getTest.json?" + val;
                $.ajax({
                    url: url,
                    type: "get",
                    dataType: "json",
                    success: function (data) {
                        console.log(data);
                    }
                })

            });
        });
    </script>
</head>
<body>
<h2>Hello World!</h2>

<div>
    <input id="inputText" type="text">
    <button id="encodeBase64">encodeBase64</button>
    <button id="decodeBase64">decodeBase64</button>
    <div id="outputText">

    </div>
</div>

<div>
    <input id="getParameter" type="text">
    <button id="sendParamenter">sendParamenter</button>
</div>

</body>
</html>
